#存取款系统模型
#
#定义bank余额
bal = 1000000


#定义一个存入和取款函数
def showbal(bal):
	'''
	展示余额的输出函数
	'''
	#当输入存款金额的时候

	input(z)
	#当输入取款金额的时候

while True:
	#输出初始界面
	print("="*12,"存取款界面系统","="*14)
	print("{0:1} {1:15} {2:15}".format(" ","1.余额查询","2.输入存款金额"))
	print("{0:1} {1:13} {2:15}".format(" ","3.输入取款金额","4.退出系统"))
	print("="*42)
	key = input("请输出对应的选择:")
	#根据键盘值，判断并执行对应的操作
	if key == "1":
		print("="*16,"查询余额","="*16)
		print(bal)
		input('按回车继续:')
	elif key == "2":
		print("="*14,"输入存款金额","="*14)
		bb={}
		bb['z']=input("请输入要存入的金额：")
		z = bb['z']
		int(bal+z)
		showbal(bal)
	elif key =="3":
		print("="*14,"输入取款金额","="*14)
		input(n)
		bal = bal-n
		showbal(bal)
	elif key == "4":
		print("="*18,"再见","="*18)
		break
	else:
		print("========无效的键盘输入，请重新输入========")
